unit common;

interface
uses
  messages, Classes;

const
	// Windows Messages
  WM_MESSAGE_MAINFORM = WM_USER + 1; // Used by Comms to flash the Green LED

type T_MESSAGE_DEST = ( MESS_NONE,
                        MESS_PACKET);

type
  pMessageData = ^ T_MESSAGE_DATA;

  T_MESSAGE_DATA = record
  destination : T_MESSAGE_DEST;
  dataU8      : Byte;
  dataS8      : ShortInt;
  dataU16     : Word;
  dataS16     : SmallInt;
  dataU32     : LongWord;
  dataS32     : integer;
  dataS64     : Int64;
  dataStr     : string;
  datafloat   : single;
  dataDouble  : Double;
end;

  T_PACKET = record
    id    : string;
    rssi  : integer;
end;

const
  PACKET_OFFSET_DEBUG = 4;  // 4 bytes Note: All offsets are '1' based
  PACKET_LEN_DEBUG    = 4;
  PACKET_OFFSET_ID    = 8;  // 4 bytes
  PACKET_LEN_ID       = 4;
  PACKET_OFFSET_RSSI  = 15; // 2 bytes
  PACKET_LEN_RSSI     = 2;

const CRLF = #13#10;


implementation



end.
